package cn.zkrt.iotms.config;

import cn.zkrt.iotms.feign.SmwClient;
import cn.zkrt.iotms.feign.token.TokenContext;
import com.fasterxml.jackson.databind.ObjectMapper;
import cn.zkrt.iotms.filter.RequestHandlerFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

@Configuration
public class FilterConfig {


    @Resource
    private SmwClient smwClient;
    @Resource
    private ObjectMapper objectMapper;
    @Resource
    private TokenContext tokenContext;


  @Bean
    public RequestHandlerFilter requestHandlerFilter() {
        return new RequestHandlerFilter(objectMapper, smwClient,tokenContext);
    }



}